1. Field of the Invention
The invention generally relates to a three-dimensional (3D) graphics processing technique, and more particularly, to a 3D graphics clipping method when a view point is located between a near clipping plane and a far clipping plane, a 3D graphics displaying method, and a graphics processing apparatus using the same.
2. Description of Related Art
In an application of the three-dimensional (3D) graphics displaying technique (particularly, a computer game), the relative position of a stereoscopic object, a scene, and the view point of a viewer in the virtual 3D space quickly changes with the operation of the application (the computer game). Thus, high-speed graphics processing is desired in order to satisfy the viewer's requirement to high image quality of real-time graphics operation.
FIG. 1 is a diagram of a viewing pyramid in a 3D graphics displaying technique. Generally speaking, the 3D graphics displaying technique is to display a stereoscopic object and a scene that are observed by a viewer from a view point VP and are located within a view field VI between a near clipping plane 110 and a far clipping plane 120 onto a two-dimensional (2D) screen in unit of pixels through a rendering procedure. In other words, the graphics displayed on the 2D screen can be considered as a virtual image obtained by capturing the view field VI from the view point VP by using a virtual camera. Generally, the view field VI is defined by the near clipping plane 110 and the far clipping plane 120, and related information of the view point VP, the near clipping plane 110, and the far clipping plane 120 are carried in the image processing procedure.
In an existing 3D graphics displaying technique, a stereoscopic object is composed of many faces. Based on the geometrical characteristics of triangle (for example, the three vertexes of a triangle have to be located on the same plane), a stereoscopic object can be composed of many triangles. Herein the triangles 130 in FIG. 1 will be taken as examples. In order to achieve real-time operation and display stereoscopic objects, a designer usually deletes those triangles 130 that are not visible from the view point VP by polygonal culling and clipping procedures.
To be specific, the virtual camera also has a view field VI. When a triangle 130 intersects a boundary of the view field VI, the clipping procedure keeps the portion of the triangle 130 within the view field VI (a subsequent graphics processing procedure simply projects this portion of the triangle 130 onto the 2D screen) and deletes the portion of the triangle 130 outside the view field VI. Thereby, such a clipping procedure can speed up the rendering procedure of a current scene and reduce the hardware computing loading. Besides, such a clipping procedure allows an application developer to increase the operation precision of pre-rendering or real-time rendering operation and accordingly the frame rate and visual quality of displayed images.
However, in some cases (for example, in a fast-moving game scene), the view point may be located within the view field VI and a video card with a 3D hardware accelerator (or related hardware) that cannot resolve this problem still sets the view field VI according to the near clipping plane 110 and the far clipping plane 120. As a result, graphics processing errors may be produced. Regarding this problem, two resolutions are provided conventionally. According to the first resolution, the depth of field (DOF) between the view point and the near clipping plane is further determined by using a driver program or a software algorithm, and the parameters of related graphics processing procedures are re-set. According to the second resolution, a video card supporting a far clipping procedure is adopted to deal with the special situation in which the DOF of the screen space (i.e., the axis W of the screen space) is negative. However, the first resolution impacts the efficiency of real-time graphics processing, and the second resolution consumes a lot of hardware resources and reduces the precision of the clipping procedure.
Thereby, a 3D graphics clipping method for resolving problems produced when a view point is located between a near clipping plane and a far clipping plane is desired.